function [nei, bn, trl] = mesh_trianglestoneighbors(nc, tri)
% mesh_trianglestoneighbors  - get mesh neighbors list from triangles
%
% FORMAT:       [nei, bn [, trl]] = mesh_trianglestoneighbors(nc, tri)
%
% Input fields:
%
%       nc          1x1 number of vertices
%       tri         Cx3 triangles (one-based)
%
% Output fields:
%
%       nei         Nx2 neighbors list (1-based)
%       bn          1xN neighbors list with warnings
%       tri         Nx1 triangle list (1-based)

% Version:  v0.7f
% Build:    8110521
% Date:     Nov-05 2008, 9:00 PM CET
% Author:   Jochen Weber, SCAN Unit, Columbia University, NYC, NY, USA
% URL/Info: http://wiki.brainvoyager.com/BVQXtools

% just bail out
error( ...
    'BVQXtools:MEXMissing', ...
    'This is a compiled function. Required MEX file is missing.' ...
);
